import { useDict } from '@/utils/dict'
import { parseTime, selectDictLabel } from '@/utils/ruoyi'
const { biz_call_record_type } = useDict('biz_call_record_type')
// 本地列表配置
export const WORKORDERLISTTABLE = [
  {
    show: true,
    prop: 'telDate',
    label: '来电时间',
    align: 'center',
    minWidth: 180
  },
  {
    show: true,
    prop: 'telPerson',
    label: '来电人',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'personTel',
    label: '来电号码',
    align: 'center',
    minWidth: 110
  },
  {
    show: true,
    prop: 'type',
    label: '来电类型',
    align: 'center',
    minWidth: 100,
    formatter: row => {
      return selectDictLabel(biz_call_record_type.value, row.type)
    }
  },
  {
    show: true,
    prop: 'userName',
    label: '受理人',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'customerName',
    label: '客户名称',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'customerTaxcode',
    label: '税号',
    align: 'center',
    minWidth: 100,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'questionTypeName',
    label: '问题分类',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'questionContent',
    label: '问题描述',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'questionAnswer',
    label: '问题答案',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'isNuoYan',
    label: '是否诺言',
    align: 'center',
    minWidth: 110,
    formatter: row => {
      return row.isNuoYan == 1 ? '是' : '否'
    }
  },
  {
    show: true,
    prop: 'isDispatch',
    label: '是否需求派单',
    align: 'center',
    minWidth: 110,
    formatter: row => {
      return row.isDispatch == 1 ? '是' : '否'
    }
  },
  {
    show: true,
    prop: 'dispatchAddress',
    label: '派单地址',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'dispatchContact',
    label: '派单联系人',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'dispatchPhone',
    label: '派单电话',
    align: 'center',
    minWidth: 110
  }
]

// 异常单据
export const ABNORMALDOCUMENTSTABLE = [
  {
    show: true,
    prop: 'telDate',
    label: '来电时间',
    align: 'center',
    minWidth: 180
  },
  {
    show: true,
    prop: 'personTel',
    label: '来电号码',
    align: 'center',
    minWidth: 110
  },
  {
    show: true,
    prop: 'userName',
    label: '受理人',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'customerName',
    label: '客户名称',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'customerTaxcode',
    label: '税号',
    align: 'center',
    minWidth: 100,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'questionTypeName',
    label: '问题分类',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'questionContent',
    label: '问题描述',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'questionAnswer',
    label: '问题答案',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  }
]
